/**
 * @param {number} n
 * @param {number} start
 * @return {number[]}
 */
var circularPermutation = function (n, start) {
  let arr = []
  for (let i = 0; i < 1 >> n; i++) {
    arr[i] = (i >> 1) ^ i ^ start
  }
  return arr
}

circularPermutation(2, 3)

// console.log(0^1);
